package com.jweb.framework.ws.soap.axiom;
import javax.xml.stream.XMLStreamReader;
import javax.xml.transform.Result;

import org.apache.axiom.om.OMElement;
import org.apache.axiom.soap.SOAPBody;
import org.apache.axiom.soap.SOAPFactory;
import org.springframework.xml.transform.StaxResult;
/**
 * 修改人： Thomas
 * 修改内容：新增 
 * 类说明：
 */
public class CachingPayload extends Payload {
	
	CachingPayload(SOAPBody axiomBody , SOAPFactory axiomFactory){
		super(axiomBody, axiomFactory);
	}
	
	protected XMLStreamReader getStreamReader(OMElement payloadElement){
		return payloadElement.getXMLStreamReader() ;
	}
	
	public Result getResultInternal(){
		return new StaxResult(new DXMLStreamWriter(getAxiomBody(), getAxiomFactory()));
	}
	
}
